Fix D103 garmins for wpt names < 6 chars. Test for isalnum() after testing for
authorrobertl <robertl>
Wed, 13 Aug 2008 18:06:07 +0000 (18:06 +0000)
committerrobertl <robertl>
Wed, 13 Aug 2008 18:06:07 +0000 (18:06 +0000)
end of string.

jeeps/gpsapp.c

index 651ed61e3a22686c039cca5e1085a4a04ae4504c..326fe2c0762411f48d018e584f8d3b0f1977af78 100644 (file)
@@ -124,12 +124,12 @@ void copy_char_array(UC **dst, char* src, int count, copycase mustupper)
        int ocount =  count;
        do {
                UC sc = *src++;
-               if (!isalnum(sc)) continue;
                if (sc == 0) {
                        while (count--) 
                                *d++ = ' ';
                        break;
                }
+               if (!isalnum(sc)) continue;
                else *d++ = mustupper == UpperYes ? toupper(sc) : sc;
        } while (--count) ;
        *dst += ocount;